﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Admin.Master" Inherits="System.Web.Mvc.ViewPage<OptimumInfra.Models.Newsletter>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="AdminContent" runat="server">

    <h2>Edit</h2>
            <% using (Html.BeginForm("Edit", "Email", FormMethod.Post, new { id="emailCreate"}))
               { %>
          <table width="700" style="margin-top: 10px;">
          <tr>
          <td>          
                <div class="editor-label">
                    <%: Html.LabelFor(email => email.Email)%>
                </div>
            </td> 
            <td>
                <div class="editor-field">
                    <%: Html.TextBoxFor(email => email.Email)%>
                    <%: Html.ValidationMessageFor(email => email.Email)%>
                </div>
           </td> 
          </tr>
            
            <tr>
               <td colspan="2">
                <p>
                    <input type="submit" value="Update" />
                </p>
                </td>
            </tr>      
            </table>
    <% } %>
    <script>
        $(document).ready(function () {
            $("#emailCreate").validate({
                rules: {
                    Email: {
                        required: true,
                        email: true
                    }
                }
            });
        });
  </script>

</asp:Content>
